//
//  UIView+category.m
//  NeedYouPower
//
//  Created by XD-XY on 6/27/14.
//  Copyright (c) 2014 XD-XY. All rights reserved.
//

#import "UIView+category.h"
#import "XDHeader.h"

@implementation UIView (category)

+(id)initViewRect:(CGRect )rect andBackGroudColor:(UIColor *)color
{
    UIView * view = [[UIView alloc] initWithFrame:rect];
    view.backgroundColor = color;
    return view;
}

+(id)initViewRect:(CGRect )rect andBackGroudImage:(UIImage *)image
{
    UIView * view = [[UIView alloc] initWithFrame:rect];
    view.backgroundColor = [UIColor colorWithPatternImage:image];;
    return view;
}

@end
